Skip to content

Clam 2410 recent coverity issues#998

Merged
val-ms merged 8 commits intoCisco-Talos:mainfrom
val-ms:CLAM-2410-recent-coverity-issues
Aug 17, 2023
Merged

Clam 2410 recent coverity issues#998
val-ms merged 8 commits intoCisco-Talos:mainfrom
val-ms:CLAM-2410-recent-coverity-issues

Conversation

@val-ms
Copy link
Contributor

@val-ms val-ms commented Aug 11, 2023

No description provided.

val-ms added 8 commits August 16, 2023 18:10
`cli_getpagesize()` may return -1 in an error condition.
If it does, let's just treat it as 4096.

I believe the actual coverity complaint is a false positive, but it's
fair to account for the error case and this should shut it up.
On error `getmaxyx()` may set the output params to -1.
We must check for this before treating the result as unsigned.
The `read()` function doesn't null terminate the `nwatch_str`, but
`strtol` requires it to be NULL-terminated.
In aspack decrypt function, there's a check to make sure that backbytes
doesn't exceed 57, because it is used as an index in init_array.
However, it is mathematically impossible.
So this commit removes the check.
Somehow forgot to save and commit final error handling check on the new
set_tls_client_certificate() function.
This change is needed to have Freshclam fail if you try to use the new
client certificate environment variables incorrectly.
@val-ms val-ms force-pushed the CLAM-2410-recent-coverity-issues branch from 17eefa5 to 9581ed6 Compare August 17, 2023 01:10
@val-ms val-ms merged commit a6501dd into Cisco-Talos:main Aug 17, 2023
@val-ms val-ms deleted the CLAM-2410-recent-coverity-issues branch August 17, 2023 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants